package com.lei.mq.exception;

import com.lei.mq.enums.ApiErrorEnum;

public class ApiException extends RuntimeException{
	private String code;
	private String message;
	
	public ApiException(String code, String message) {
		super();
		this.code = code;
		this.message = message;
	}
	public ApiException(ApiErrorEnum apiErrorEnum) {
		super();
		this.code = apiErrorEnum.getErrorCode();
		this.message = apiErrorEnum.getErrorMsg();
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	
}
